import { request } from '../utils/request'

// 用户登录
export function userLogin(params) {
    return request({
        method: 'post',
        url: 'user/login',
        data: params,
        headers:{
            'Content-type': 'application/json',
            'token': window.localStorage.token
        }
    })
}

export function usersignup(params){
    return request({
        method: 'post',
        url: 'user/addUser',
        data: params,
    })
}

export function userlist(params){
    return request({
        method:'post',
        url:'user/getUserList',
        data:params
        }
    )
}

export function adduser(params){
    return request({
        method:'post',
        url:'user/addUser',
        data:params
    })
}

export function edituser(params){
    return request({
        method:'post',
        url:'user/edit',
        data:params
    })
}

export function delOne(params){
    return request({
        method:'post',
        url:'user/delUserById',
        data:params
    })
}

export function delMore(params){
    return request({
        method:'post',
        url:'user/delBatch',
        data:params
    })
}
